package scuts.core.instances;

import scuts.core.classes.Eq;

class EqEnumByIndex extends Eq<Enum<Dynamic>> {
  
  public static var get(getInstance, null):EqEnumByIndex;
  
  static function getInstance ()
  {
    if (get == null) get = new EqEnumByIndex();
    return get;
  }
  function new () {}
  //
  override public function eq (a:Enum<Dynamic>, b:Enum<Dynamic>):Bool {
    return Type.enumIndex(a) == Type.enumIndex(b);
  }
}